package com.zheng.rpc.loadbalance;

import com.zheng.rpc.extensions.SPI;

import java.util.List;

@SPI
public interface LoadBalance {
    /**
     * 从现有服务地址列表中选择一个提供服务
     *
     * @param serviceAddresses Service address list
     * @return target service address
     */
    String selectServiceAddress(List<String> serviceAddresses, String rpcServiceName);
}
